<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <title>我是代理</title>
    <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon"/>

    <link type="text/css" rel="stylesheet" href="/template/default/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/template/default/css/common.css">
    <link type="text/css" rel="stylesheet" href="/template/default/css/custom_common.css"/>

    <script type="text/javascript" src="https://static.9hive.cn/global/vendor/jquery/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>
    <style>
        .layui-layer-content {
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
        }


    </style>
</head>
<body>

<a class="tabbar" href="javascript:history.back(-1)" title="返回"><img
        src="/template/default/images/arrow_left_white.png"/><label>我是代理</label></a>
<div class="">
    <div class="flex-horziontal background-white padding-15">
        <img src="http://imgs.weimih.com/-1/201712/e06a5a6be0f34dd4b7bb1d34cc98c29e.jpg"
             class="img_80 img-circle margin-right-10">
        <div class="flex-1">
            <div class="font-size-16"><span class="grey-700 font-size-14">代理等级：</span>${zshopMember.agentLevel!}</div>
            <div class="margin-top-5 font-size-16"><span class="grey-700 font-size-14">总收入(元)：</span>${agentBalance.balance!0.00}
            </div>
        </div>
        <div class="margin-right-10 width-100">
            <a href="/b/agentBalanceDetail/listForm" style="line-height: 24px" class="hive-btn-sm hive-btn-sm-primary">推荐记录</a>
            <!--<a href="/b/agentBalanceDetail/listForm" style="line-height: 24px"-->
               <!--class="hive-btn-sm hive-btn-sm-primary margin-top-5">余额提现</a>-->
        </div>
    </div>
    <div class="background-white margin-top-5 vertical-flex-center padding-15 ">
        <!--<img src="http://p09cnrci6.bkt.clouddn.com/plateform/201712/6ebeb20566b64876b8dd5e568d9e7751.jpg" class="qrcode-img">-->
        <img src="/b/agent/agentQrcode/${zshopMember.agentCode!}" class="qrcode-img">
        <div class="margin-top-10">长按推荐二维码发送给朋友，邀请对方加入代理</div>
    </div>
    <div class="background-white margin-top-10 vertical-flex-center padding-15 ">
        <!--<img src="http://p09cnrci6.bkt.clouddn.com/plateform/201712/6ebeb20566b64876b8dd5e568d9e7751.jpg" class="qrcode-img">-->
        <img src="/b/agent/agentQrcode/${zshopMember.businessQrcode!}" class="qrcode-img">
        <div class="margin-top-10">长按推荐二维码发送给朋友，邀请对方加入平台商户</div>
    </div>
    <div class="height-100 background-white"></div>
</div>

<script>
    $(document).on('click', '#tablayout > li', function () {
        $("#tablayout > li").each(function (index, e) {
            $(this).removeClass("active");
            if (!$(".pay_qrcode").eq(index).hasClass("hidden")) {
                $(".pay_qrcode").eq(index).addClass("hidden");
                console.log(index)
            }
        });
        $(this).addClass("active");
        var currentIndex = $("#tablayout >li").index($(this));
        $(".pay_qrcode").eq(currentIndex).removeClass("hidden");

    });
    $(document).on('click', '#seeDetail', function () {
        var password = $('#password').val();
        if (!password) {
            layer.msg("请输入密码");
            return false;
        }

        $.ajax({
            url: '/b/test/applyOrAgentLogin',
            data: {
                password: password,
                isAgent: true
            },
            success: function (data) {
                if (data.state == "ok") {
                    window.location.href = ""//填写跳转地址
                } else {
                    layer.msg(data.info)
                }
            }
        })
    })
</script>
</body>
</html>